<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Acount Model Config</title>
	
	<jsp:include page="/core/tool/resources.jsp"></jsp:include>
	<script src="./modeldetail.js"></script>
		
</head>
<body>

	<div id="panel" class="easyui-panel" title="策略配置" data-options="toolbar:'#toolbar',collapsible:true" style="width:100%">
		<div id="toolbar" style="margin-bottom:5px">
			<a class="easyui-linkbutton" iconCls="icon-back" onclick="click_back()">返回</a>
			<a class="easyui-linkbutton" iconCls="icon-save" onclick="click_save_model()">保存</a>
			<a class="easyui-linkbutton" iconCls="icon-remove" onclick="click_delete_model()">删除</a>
		</div>
		<form id="ff" method="post" ajax="true">
			<table>
				<tr>
					<td>编码</td>
					<td><input class="easyui-textbox" name="code" data-options="required:true, editable:false"/></td>
					<td>名称</td>
					<td><input class="easyui-textbox" name="name" data-options="required:true"/></td>
					<td>方法</td>
					<td colspan="3"><input class="easyui-textbox" name="strategyClass" data-options="width:400"/></td>
				</tr>
				<tr>
					<td>sortName</td>
					<td><input class="easyui-textbox" name="sortName" data-options="prompt:'rating'"/></td>
					<td>sortOrder</td>
					<td><input class="easyui-textbox" name="sortOrder" data-options="prompt:'desc'"/></td>
					<td>multiSort</td>
					<td><input class="easyui-textbox" name="multiSort" data-options="prompt:false"/></td>
				</tr>
				<tr>
					<td>股票池</td>
					<td colspan="7"><input class="easyui-textbox" name="secList"  data-options="width:750,height:50,multiline:true"/></td>
				<tr>
				<tr>
					<td>策略说明</td>
					<td colspan="7"><input class="easyui-textbox" name="desp"  data-options="width:750,height:50,multiline:true"/></td>
				<tr>
				<c:forEach var="item" varStatus="status" begin="1" end="20">
				<tr>
					<td>字段${item} 名称</td>
					<td><input class="easyui-textbox" name="col${item}"/></td>
					<td>类型</td>
					<td><input class="easyui-textbox" name="col${item}t"/></td>
					<td>排序</td>
					<td><input class="easyui-textbox" name="col${item}o"/></td>
					<td>格式</td>
					<td><input class="easyui-textbox" name="col${item}f" data-options="width:320"/></td>
				</tr>
				</c:forEach>
			</table>
		</form>
	</div>

	<div style="height:5px"></div>
	<div id="toolbar2">
	   <a class="easyui-linkbutton" iconCls="icon-back" onclick="click_back()">返回</a>
 	   <a class="easyui-linkbutton" iconCls="icon-add" onclick="click_add_model_param()">新增</a>
       <a class="easyui-linkbutton" iconCls="icon-remove" onclick="$('#dg').edatagrid('destroyRow')">删除</a>
       <a class="easyui-linkbutton" iconCls="icon-undo" onclick="$('#dg').edatagrid('cancelRow')">取消</a>
       <a class="easyui-linkbutton" iconCls="icon-save" onclick="$('#dg').edatagrid('saveRow')">保存</a>
	</div>
	<table id="dg" class="easyui-edatagrid" title="参数配置" style="width:100%"
            data-options="toolbar:'#toolbar2', editing:true, sortOrder:'asc', sortName:'acountId', rownumbers:true, singleSelect:true,collapsible:true,
           	 	updateUrl:'./modelparamsave.json', 
           	 	destroyUrl:'./modelparamdelete.json', 
           	 	saveUrl:'./modelparamsave.json',
           	 	onSave:dg_onSave
           	 	">
        <thead>
            <tr>
           	 	<th data-options="field:'paramCode',width:100, editor:'textbox'" sortable="true">参数编码</th>
                <th data-options="field:'paramName',width:100, editor:'textbox'">参数名称</th>
                <th data-options="field:'defaultValue',width:100, editor:'textbox'">默认值</th>
                <th data-options="field:'configurable',width:100, editor:{type:'combobox',options:{flexset:'BASE_TRUEFALSE'}} ">可配置</th>
            </tr>
        </thead>
    </table>

</body>
</html>